import React, { Suspense } from "react";
// TODO: 添加Loading效果
export default function asyncComponent(ImportComponent: React.LazyExoticComponent<any>) {
  return class AsyncComponent extends (React.PureComponent || React.Component) {
    render(){
      return <Suspense fallback={"Loading"}>
        <ImportComponent></ImportComponent>
      </Suspense>
    }
  }
}